import request from '@/utils/request'

// 查询告警规则执行条件列表
export function listExecution(query) {
  return request({
    url: '/biz/execution/list',
    method: 'get',
    params: query
  })
}

// 查询告警规则执行条件详细
export function getExecution(id) {
  return request({
    url: '/biz/execution/' + id,
    method: 'get'
  })
}

// 新增告警规则执行条件
export function addExecution(data) {
  return request({
    url: '/biz/execution',
    method: 'post',
    data: data
  })
}

// 修改告警规则执行条件
export function updateExecution(data) {
  return request({
    url: '/biz/execution',
    method: 'put',
    data: data
  })
}

// 删除告警规则执行条件
export function delExecution(id) {
  return request({
    url: '/biz/execution/' + id,
    method: 'delete'
  })
}

// 导出告警规则执行条件
export function exportExecution(query) {
  return request({
    url: '/biz/execution/export',
    method: 'get',
    params: query
  })
}